<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		.no1 {
			width: 0;
			height: 0;
			border-top: 8px blue solid;
			border-right: 8px pink solid;
			border-left: 8px black solid;
			border-bottom: 8px orange solid;
		}

		.no2 {
			width: 0px;
			height: 0px;
			border: 8px transparent solid;
			border-bottom-color: red;
		}

		.jd {
			position: relative;
			margin: 100px auto;
			width: 150px;
			height: 200px;
			background-color: blue;
		}

		.jd span {
			position: absolute;
			top: -16px;
			left: 125px;
			width: 0;
			height: 0;
			border: 8px solid transparent;
			border-bottom-color: blue;
		}

		.mi {
			position: relative;
			width: 260px;
			height: 100px;
			background-color: #666;
		}

		.mi div {
			position: absolute;
			right: -20px;
			top: 20px;
			width: 0;
			height: 0;
			/* 行高和字体大小是为为了兼容低版本浏览器 */
			line-height: 0;
			font-size: 0;
			border: 10px solid transparent;
			border-left: 10px solid #666;
		}
	</style>
</head>

<body>
	<!-- 使盒子的宽和高为0，然后设置透明的边框，更改颜色 -->
	<div class="no1"></div>
	<div class="no2"></div>
	<div class="jd">
		<span></span>
	</div>
	<div class="mi">
		<div></div>
	</div>
</body>

</html>